package org.easyx.ser.sys.entity;

import org.easyx.core.db.entity.BaseEntity;
import org.easyx.core.utils.ObjKit;

import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;

/**
 * <p>
 * 角色
 * </p>
 *
 * @author xiaojl
 * @since 2017-09-13
 */
@TableName("sys_role")
public class SysRole extends BaseEntity<SysRole> {

    private static final long serialVersionUID = 1L;

    /**
     * 角色名
     */
	private String name;
	
	
    /**
     * 排序号
     */
	private Integer seq;
	
	
    /**
     * 简介
     */
	private String description;
	
	
    /**
     * 状态
     */
	private Integer status;
	
	


	@Override
	public Wrapper<SysRole> bindingQueryWrapper() {
		Wrapper<SysRole> wrapper = new EntityWrapper<SysRole>();
		if(ObjKit.isNotEmpty(this.name)){
			wrapper.like("name", this.name);
		}
		if(ObjKit.isNotEmpty(this.seq)){
			wrapper.eq("seq", this.seq);
		}
		if(ObjKit.isNotEmpty(this.description)){
			wrapper.like("description", this.description);
		}
		if(ObjKit.isNotEmpty(this.status)){
			wrapper.eq("status", this.status);
		}
		if(ObjKit.isNotEmpty(this.createTimeStart)){
			wrapper.gt("createTime", this.createTimeStart);
		}
		if(ObjKit.isNotEmpty(this.createTimeEnd)){
			wrapper.lt("createTime", this.createTimeEnd);
		}
		return wrapper;
	}


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}


	@Override
	public String toString() {
		return "SysRole [ id=" + id 
				+ " name=" + name + ","
				+ " seq=" + seq + ","
				+ " description=" + description + ","
				+ " status=" + status + ","
				+ " createBy=" + createBy + ", createTime=" + createTime
				+ ", delFlag=" + delFlag + ", createTimeStart="
				+ createTimeStart + ", createTimeEnd=" + createTimeEnd + "]";
	}

}
